package cn.iocoder.yudao.module.asasc.controller.admin.profitreport.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

@Schema(description = "管理后台 - 投入产出报告 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProfitReportRespVO {

    @Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18086")
    @ExcelProperty("自增主键")
    private Long id;

    @Schema(description = "组织 ID", example = "48")
    @ExcelProperty(value = "账号", converter = DictConvert.class)
    @DictFormat("asa_org_id") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Long orgId;

    @Schema(description = "应用 ID", example = "4324")
    @ExcelProperty(value = "应用", converter = DictConvert.class)
    @DictFormat("asa_app_id") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Long adamId;

    @Schema(description = "日期")
    @ExcelProperty("日期")
    private LocalDate repDate;

    @Schema(description = "国家或地区代码")
    @ExcelProperty(value = "国家")
//    @ExcelProperty(value = "国家", converter = DictConvert.class)
    @DictFormat("country_or_region") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String country;

    @Schema(description = "广告支出")
    @ExcelProperty("广告支出")
    private BigDecimal adSpend;

    @Schema(description = "销售额")
    @ExcelProperty("销售额")
    private BigDecimal ascSales;

    @Schema(description = "所得")
    @ExcelProperty("订阅所得")
    private BigDecimal ascProceeds;
    @Schema(description = "退款金额")
    @ExcelProperty("退款金额")
    private BigDecimal subRefundAmount;
    @Schema(description = "退款所得")
    @ExcelProperty("退款所得")
    private BigDecimal subRefundProceeds;
    @Schema(description = "首次安装次数")
    @ExcelProperty("首次安装次数")
    private Integer ascInstalls;

    @Schema(description = "重新安装次数")
    @ExcelProperty("重新安装次数")
    private Integer ascReInstalls;

    @Schema(description = "更新安装次数")
    @ExcelProperty("更新安装次数")
    private Integer ascUptInstalls;

    @Schema(description = "广告安装")
    @ExcelProperty("广告安装")
    private Integer adInstalls;
    @Schema(description = "自然新增")
    @ExcelProperty("自然新增")
    private Integer naturallyInstalls;

    @Schema(description = "试订数")
    @ExcelProperty("试订数")
    private Integer subTrial;

    @Schema(description = "订阅数")
    @ExcelProperty("订阅数")
    private Integer subRenewal;

    @Schema(description = "退款数")
    @ExcelProperty("退款数")
    private Integer subRefund;


    @Schema(description = "广告展示")
    @ExcelProperty("广告展示")
    private Integer adImpressions;

    @Schema(description = "广告点击")
    @ExcelProperty("广告点击")
    private Integer adTaps;

    @Schema(description = "广告点击率")
    @ExcelProperty("广告点击率")
    private BigDecimal adTtr;

    @Schema(description = "广告转化率")
    @ExcelProperty("广告转化率")
    private BigDecimal adConversionRate;

    @Schema(description = "展示次数")
    @ExcelProperty("展示次数")
    private Integer ascImpressions;

    @Schema(description = "点击次数")
    @ExcelProperty("点击次数")
    private Integer ascTaps;

    @Schema(description = "点击率")
    @ExcelProperty("点击率")
    private BigDecimal ascTtr;

    @Schema(description = "转化率")
    @ExcelProperty("转化率")
    private BigDecimal ascConversionRate;

    @Schema(description = "广告转化费用")
    @ExcelProperty("广告转化费用")
    private BigDecimal adCpa;

    @Schema(description = "广告点击费用")
    @ExcelProperty("广告点击费用")
    private BigDecimal adCpt;

    @Schema(description = "广告千次展示")
    @ExcelProperty("广告千次展示")
    private BigDecimal adCpm;
}